function dbUpasync(sql) {
    const p = new Promise((resolve, reject) => {
        setTimeout(
            () => {
                console.log(sql + "update");
                resolve(sql + "ok");
            }, 800)
    });
    return p;
}
// method 1
// dbUpasync("2.sql1")
// .then(() => dbUpasync("2.sql2"))
// .then(() => dbUpasync("2.sql3"));

// methode 2 use async await
async function upAllDB() {
    const res1 = await dbUpasync("3.sql1");
    const res2 = await dbUpasync("3.sql2");
    const res3 = await dbUpasync("3.sql3");
    console.log(res1, res2, res3);
}

upAllDB();